package com.dmxh.controller;

import com.dmxh.pojo.TbItem;
import com.dmxh.result.Result;
import com.dmxh.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/item")
public class ItemController {

    @Autowired
    private ItemService itemService;

    @PostMapping("/queryItemBySeller")
    public TbItem queryItemSeller(@RequestParam Long itemId) {
        return this.itemService.queryItemBySeller(itemId);
    }

    @PutMapping("/updateItemNumById")
    public void updateItemNumById(@RequestBody List<TbItem> itemList) {
        this.itemService.updateItemNumById(itemList);
    }
}
